<?php
Yii::app()->clientScript->registerScript("manage_star_js","
var MANAGE_STAR = {
    'indexStarSetting':'".Yii::app()->createAbsoluteUrl('manage/index/setting')."',
    'indexGenerate':'".Yii::app()->createAbsoluteUrl('manage/index/generate')."',
};
",CClientScript::POS_HEAD);
?>

    <div class="bk3 w200">
        <a href="<?php echo Yii::app()->createUrl('star/index'); ?>">
            <div class="chat-header2">
                <div class="chat-header-left">
                    <span> </span>
                    <h2>达人推荐</h2>
                </div>
                <div class="clear"></div>
            </div>
        </a>
    </div>

<?php if($role){ ?>
    <div class="contextual-links-region" id="index-star-setting-block">
    <div class="contextual-links-wrapper contextual-links-processed">
        <a href="javascript:void(0);" class="contextual-links-trigger">配置</a>
        <ul class="contextual-links">
            <li class="block-configure">
                <a class="white fr manage-index-star-setting" title="设置" data-code="index_star_section" href="javascript:void(0);">
                    <i class="fa fa-cog"></i>&nbsp;配置
                </a>
            </li>
            <li class="views-ui-edit first">
                <a class="white fr manage-index-star-generate" title="生成" data-code="index_star_section" href="javascript:void(0);">
                    <i class="fa fa-share-alt"></i>&nbsp;生成
                </a>
            </li>
        </ul>
    </div>
<?php } ?>
    <div class="bk4 mb10">
        <?php foreach($info as $v){ ?>
        <div class="status-grid dr">
            <a href="<?php echo Yii::app()->createUrl('people/index',array('domain'=>$v['info']['domain'])) ?>">
                <div class="status-grid-head">
                    <img title="<?php echo $v['info']['nick_name'] ?>" src="<?php echo Yii::app()->easyImage->thumbSrcOf($v['info']['bg'],array('resize' => array('width' => 298))); ?>">
                </div>
                <div class="status-people-pic">
                    <?php if($v['info']['avatar_status']){ ?>
                    <img class="stat-people" src="<?php echo Xtutuquan::getAvatar($v['info']['id']); ?>" title="<?php echo $v['info']['nick_name'] ?>"/>
                    <?php }else{ ?>
                        <img class="stat-people" src="<?php echo Yii::app()->params['info']['imgPath'].'uploads/public/avatar/'.$v['info']['avatar_public'].'.jpg'; ?>" title="<?php echo $v['info']['nick_name'] ?>"/>
                    <?php } ?>
                    <img class="people-avilabel" src="<?php echo $staticsPath; ?>/images/avila.png" title="avilabel"/>
                </div>
                <div class="status-people-info">
                    <h2><?php echo $v['info']['nick_name'] ?></h2>
                    <span class="status-people-content"><?php echo $v['info']['feeling'] ?></span>
                    <p><i class="fa fa-star"></i><span><?php echo $v['info']['total_followers'] ?></span>&nbsp;<i class="fa fa-database"></i><span><?php echo $v['info']['total_shares'] ?></span></p>
                </div>
                <div class="clear"></div>
            </a>
        </div>
        <?php } ?>
        <div class="clear"></div>

    </div>
<?php if($role){ ?>
    <script type="text/javascript">
        $(function () {
            $.getContextual("#index-star-setting-block");
        });
    </script>
    </div>
<?php } ?>

<?php if($role){ ?>
    <div id="manage_index_star_setting" style="display: none;">
        <div style="width:350px;height:40px;float:left">
            <label for="ManageStarNum" style="text-align: left;width: 50px;float:left">数量</label>
            <div style="margin-left: 70px;">
                <input type="text" value="<?php echo $num; ?>" placeholder="数量" id="ManageStarNum">
            </div>
        </div>
    </div>
<?php } ?>